<!--
*Author：DGZ
 *Contact：jiduxiong@dagongzao.com
 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *业务请在@/extension/dianduproject/ccdreport/Ccd_Report.jsx此处编写
 -->
<template>
    <view-grid ref="grid"
               :columns="columns"
               :detail="detail"
               :details="details"
               :editFormFields="editFormFields"
               :editFormOptions="editFormOptions"
               :searchFormFields="searchFormFields"
               :searchFormOptions="searchFormOptions"
               :table="table"
               :extend="extend">
    </view-grid>
</template>
<script>
    import extend from "@/extension/dianduproject/ccdreport/Ccd_Report.jsx";
    import { ref, defineComponent } from "vue";
    export default defineComponent({
        name: "Ccd_Report",
        setup() {
            const table = ref({
                key: "Id",
                footer: "Foots",
                cnName: "CCD结单",
                name: "ccdreport/Ccd_Report",
                newTabEdit: false,
                url: "/Ccd_Report/",
                sortName: "Id"
            });
            const editFormFields = ref({"DianduNo":"","ProductId":"","Spec":"","Grade":"","IncomeQty":"","Reporter":"","EquipmentNo":"","ReportQty":"","OkQty":"","OkQtyA":"","OkQtyB":"","OkQtyC":"","WaiguanNgQty":"","WaiguanNgQtyA":"","WaiguanNgQtyB":"","WaiguanNgQtyC":"","SizeNgQty":"","GeometryNgQty":"","XingweiNgQty":"","GongcanQty":"","ScrapRecord":"","LossPcs":"","JudgeResult":"","PassRate":"","WaiguanNgRate":"","SizeNgRate":"","GongCanRate":"","LossRate":"","Remarks":""});
            const editFormOptions = ref([[{"title":"电镀号","field":"DianduNo","type":"selectTable"}],
                              [{"title":"产品代码","field":"ProductId","disabled":true},
                               {"title":"产品规格","field":"Spec","disabled":true},
                               {"title":"产品性能","field":"Grade","disabled":true},
                               {"title":"来料总数","field":"IncomeQty","disabled":true,"type":"number"}],
                              [{"dataKey":"CCD设备编号","data":[],"title":"设备号","field":"EquipmentNo","type":"select"},
                               {"dataKey":"CCD结单人员","data":[],"title":"结单人","field":"Reporter","type":"select"},
                               {"title":"结单数量","field":"ReportQty","type":"number"}],
                              [{"title":"合格总数","field":"OkQty","type":"number"},
                               {"title":"合格上档数量","field":"OkQtyA","type":"number"},
                               {"title":"合格中档数量","field":"OkQtyB","type":"number"},
                               {"title":"合格下档数量","field":"OkQtyC","type":"number"}],
                              [{"title":"外观NG总数","field":"WaiguanNgQty","type":"number"},
                               {"title":"外观NG上档数量","field":"WaiguanNgQtyA","type":"number"},
                               {"title":"外观NG中档数量","field":"WaiguanNgQtyB","type":"number"},
                               {"title":"外观NG下档数量","field":"WaiguanNgQtyC","type":"number"}],
                              [{"title":"尺寸NG总数","field":"SizeNgQty","type":"number"},
                               {"title":"几何NG数量","field":"GeometryNgQty","type":"number"},
                               {"title":"形位NG数量","field":"XingweiNgQty","type":"number"}],
                              [{"title":"工残","field":"GongcanQty","type":"number"},
                               {"title":"流失片数","field":"LossPcs","type":"number"},
                               {"title":"是否有报废记录","field":"ScrapRecord"}],
                              [{"title":"合格率","field":"PassRate","disabled":true,"type":"decimal"},
                               {"title":"外观NG率","field":"WaiguanNgRate","disabled":true,"type":"decimal"},
                               {"title":"尺寸NG率","field":"SizeNgRate","disabled":true,"type":"decimal"},
                               {"title":"工残率","field":"GongCanRate","disabled":true,"type":"decimal"},
                               {"title":"流失率","field":"LossRate","disabled":true,"type":"decimal"},
                               {"title":"判定结果","field":"JudgeResult","disabled":true}],
                              [{"title":"备注","field":"Remarks","colSize":12,"type":"textarea"}]]);
            const searchFormFields = ref({});
            const searchFormOptions = ref([]);
            const columns = ref([{field:"Id",title:"ID",type:"bigint",width:110,hidden:true,readonly:true,require:true,showOverflowTooltip:true,align:"left"},
                       {field:"Date",title:"保存日期",type:"string",width:110,hidden:true,readonly:true,showOverflowTooltip:true,align:"left"},
                       {field:"Reporter",title:"结单人",type:"string",bind:{ key:"CCD结单人员",data:[]},width:110,showOverflowTooltip:true,align:"left"},
                       {field:"EquipmentNo",title:"设备号",type:"string",bind:{ key:"CCD设备编号",data:[]},width:110,showOverflowTooltip:true,align:"left"},
                       {field:"DianduNo",title:"电镀号",type:"string",width:110,showOverflowTooltip:true,align:"left"},
                       {field:"ProductId",title:"产品代码",type:"string",width:110,readonly:true,showOverflowTooltip:true,align:"left"},
                       {field:"Spec",title:"产品规格",type:"string",width:120,readonly:true,showOverflowTooltip:true,align:"left"},
                       {field:"Grade",title:"产品性能",type:"string",width:120,readonly:true,showOverflowTooltip:true,align:"left"},
                       {field:"IncomeWeight",title:"来料重量KG",type:"decimal",width:110,readonly:true,showOverflowTooltip:true,align:"left"},
                       {field:"IncomeQty",title:"来料总数",type:"int",width:110,readonly:true,showOverflowTooltip:true,align:"left"},
                       {field:"ReportQty",title:"结单数量",type:"int",width:110,showOverflowTooltip:true,align:"left"},
                       {field:"OkQty",title:"合格总数",type:"int",width:110,showOverflowTooltip:true,align:"left"},
                       {field:"OkQtyA",title:"合格上档数量",type:"int",width:110,showOverflowTooltip:true,align:"left"},
                       {field:"OkQtyB",title:"合格中档数量",type:"int",width:110,showOverflowTooltip:true,align:"left"},
                       {field:"OkQtyC",title:"合格下档数量",type:"int",width:110,showOverflowTooltip:true,align:"left"},
                       {field:"WaiguanNgQty",title:"外观NG总数",type:"int",width:110,showOverflowTooltip:true,align:"left"},
                       {field:"WaiguanNgQtyA",title:"外观NG上档数量",type:"int",width:110,showOverflowTooltip:true,align:"left"},
                       {field:"WaiguanNgQtyB",title:"外观NG中档数量",type:"int",width:110,showOverflowTooltip:true,align:"left"},
                       {field:"WaiguanNgQtyC",title:"外观NG下档数量",type:"int",width:110,showOverflowTooltip:true,align:"left"},
                       {field:"SizeNgQty",title:"尺寸NG总数",type:"int",width:110,showOverflowTooltip:true,align:"left"},
                       {field:"GeometryNgQty",title:"几何NG数量",type:"int",width:110,showOverflowTooltip:true,align:"left"},
                       {field:"XingweiNgQty",title:"形位NG数量",type:"int",width:110,showOverflowTooltip:true,align:"left"},
                       {field:"GongcanQty",title:"工残",type:"int",width:110,showOverflowTooltip:true,align:"left"},
                       {field:"ScrapRecord",title:"是否有报废记录",type:"string",width:110,showOverflowTooltip:true,align:"left"},
                       {field:"JudgeResult",title:"判定结果",type:"string",width:110,readonly:true,showOverflowTooltip:true,align:"left"},
                       {field:"PassRate",title:"合格率",type:"decimal",width:110,readonly:true,showOverflowTooltip:true,align:"left"},
                       {field:"WaiguanNgRate",title:"外观NG率",type:"decimal",width:110,readonly:true,showOverflowTooltip:true,align:"left"},
                       {field:"SizeNgRate",title:"尺寸NG率",type:"decimal",width:110,readonly:true,showOverflowTooltip:true,align:"left"},
                       {field:"GongCanRate",title:"工残率",type:"decimal",width:110,readonly:true,showOverflowTooltip:true,align:"left"},
                       {field:"LossRate",title:"流失率",type:"decimal",width:110,readonly:true,showOverflowTooltip:true,align:"left"},
                       {field:"LossPcs",title:"流失片数",type:"int",width:110,showOverflowTooltip:true,align:"left"},
                       {field:"IsValid",title:"是否有效",type:"int",width:110,hidden:true,showOverflowTooltip:true,align:"left"},
                       {field:"CreateId",title:"创建用户",type:"bigint",width:80,hidden:true,showOverflowTooltip:true,align:"left"},
                       {field:"Creator",title:"创建人",type:"string",width:100,showOverflowTooltip:true,align:"left"},
                       {field:"CreateTime",title:"创建时间",type:"datetime",width:110,showOverflowTooltip:true,align:"left"},
                       {field:"ModifyId",title:"修改用户",type:"bigint",width:80,hidden:true,showOverflowTooltip:true,align:"left"},
                       {field:"Modifier",title:"修改人",type:"string",width:100,showOverflowTooltip:true,align:"left"},
                       {field:"ModifyTime",title:"修改时间",type:"datetime",width:110,showOverflowTooltip:true,align:"left"},
                       {field:"Remarks",title:"备注",type:"string",width:150,showOverflowTooltip:true,align:"left"}]);
            const detail = ref({columns:[]});
            const details = ref([]);
            return {
                table,
                extend,
                editFormFields,
                editFormOptions,
                searchFormFields,
                searchFormOptions,
                columns,
                detail,
                details
            };
        },
    });
</script>
